<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<p id="content"></p>
<button id="big"> 窗口变大</button>
<button id="small"> 窗口变小</button>
<button id="move">移动窗口到指定的位置</button>
<script>
/*var msg = "浏览器的宽:" + window.innerWidth
    + ", 浏览器的高:" + window.innerHeight;*/
var msg = "浏览器的宽:" + (window.innerWidth || document.documentElement.clientWidth)
    + ", 浏览器的高:" + (window.innerHeight || document.documentElement.clientHeight);
var content = document.getElementById("content");
content.innerHTML = msg;

//------
big.onclick = function (){
//    window.resizeTo(1000, 300)
    window.resizeBy(10, 10) // 方法每调用一次, 宽高增加10个像素
}
small.onclick = function (){
    window.resizeBy(-10, -10) // 方法每调用一次, 宽高增加10个像素
//    window.resizeTo(600, 600)
}

move.onclick = function (){
    window.moveTo(500, 500);
};

var a = 100;
</script>
</body>
</html>